<?php

declare(strict_types=1);
/**
 * This file is part of Hyperf.
 *
 * @link     https://www.hyperf.io
 * @document https://hyperf.wiki
 * @contact  group@hyperf.io
 * @license  https://github.com/hyperf/hyperf/blob/master/LICENSE
 */
namespace App\Controller;

use Hyperf\Di\Annotation\Inject;
use Hyperf\HttpServer\Annotation\AutoController;
use App\Services\IndexService;

/**
 * @AutoController
 */
class IndexController extends AbstractController
{
    /**
     * @Inject()
     * @var IndexService
     */
    protected $indexService;

    public function get_news()
    {
        // $params = $this->validate();

        $data = $this->indexService->getNews();

        return $this->send($data);
    }

    public function get_activity()
    {
        // $params = $this->validate();

        $data = $this->indexService->getActivity();

        return $this->send($data);
    }

    public function get_month_points_ranking()
    {
        // $params = $this->validate();

        $data = $this->indexService->getMonthPointsRanking();

        return $this->send($data);
    }

    public function get_goods()
    {
        // $params = $this->validate();

        $data = $this->indexService->getGoods();

        return $this->send($data);
    }
}
